﻿using System.Collections.Generic;

namespace Dragon.Library.Framework.Entity.Search.Query
{
    public sealed class QueryGroup
    {
        public IList<QuerySearch> QuerySearch { get; set; }
        public IList<bool> IsAnd { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string OrderProperty { get; set; }

        /// <summary>
        /// 排序顺序
        /// </summary>
        public string SortOrder { get; set; }

        public int Top { get; set; }

        public QueryGroup()
        {
            QuerySearch = new List<QuerySearch>();
            IsAnd = new List<bool>();
        }

        public void AddSearch(QuerySearch search, bool isAnd)
        {
            QuerySearch.Add(search);
            IsAnd.Add(isAnd);
        }
    }
}
